<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta content="text/html;charset=UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta http-equiv="Pragma" content="no-cache"/>
    <meta http-equiv="Cache-Control" content="no cache"/>
    <meta http-equiv="Expires" content="0"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="format-detection" content="telephone=no"/>
    <script src="https://cdn.bootcss.com/pace/1.0.2/pace.min.js"></script>
    <link href="https://cdn.bootcss.com/pace/1.0.2/themes/pink/pace-theme-flash.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="../../plugins/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" type="text/css" href="../../css/fs.css" media="all"/>
    <script type="text/javascript" src="../../plugins/layui/layui.js"></script>
    <script type="text/javascript" src="../../plugins/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="../../plugins/frame/js/fsDict.js?v=1.7.0"></script>
    <script type="text/javascript" src="../../plugins/frame/js/fs.js?v=1.7.0"></script>
    <script type="text/javascript" src="../../plugins/frame/js/frame.js?v=1.7.0"></script>
    <script type="text/javascript" src="../../scripts/basic.js"></script>
</head>
<body>
<div>
    <div class="layui-fluid">
        <div class="layui-row layui-col-space1">
            <div class="layui-col-md12">
                <div class="layui-form-queryTest">
                    <form class="layui-form" id="query_form">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-mid">id：</label>
                                <div class="layui-input-inline" style="width: 100px;">
                                    <input type="tel" name="id" autocomplete="off" class="layui-input"/>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-mid">名称：</label>
                                <div class="layui-input-inline" style="width: 100px;">
                                    <input type="text" name="name" autocomplete="off" class="layui-input"/>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-mid">时间：</label>
                                <div class="layui-input-inline" style="">
                                    <input type="text" name="createDate" autocomplete="off" class="layui-input fsDate"
                                           dateRange="1" placeholder=" - "/>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <div class="layui-input-inline">
                                    <button class="layui-btn" type="button" function="queryTest"><i class="layui-icon">&#xe615;</i>查询
                                    </button>
                                </div>
                            </div>
                        </div>


                    </form>
                </div>
            </div>
            <div class="layui-col-md12">
                <div class="layui-row grid-demo">
                    <div class="layui-col-md12">
                        <table id="fsDatagrid" lay-filter="fsDatagrid" class="fsDatagrid" isLoad="1" url="act/task/history"
                               isPage="1" sortType="1" pageSize="10" defaultForm="query_form" height="full-135"></table>

                        <div class="fsDatagridCols">
                            <p type="numbers" title="#"/>
                            <p checkbox="true"/>
                            <p field="id" title="任务ID" width="100" sort="true"/>
                            <p field="processInstanceId" title="流程实例ID" width="150" sort="true"/>
                            <p field="processDefinitionId" title="流程定义ID" width="150"/>
                            <p field="assignee" title="办理人" width="100"/>
                            <p field="startTime" title="开始时间" width="100"/>
                            <p field="endTime" title="结束时间" width="100"/>
                            <p fixed="right" align="center" toolbar="#barDemo" title="操作" width="280"/>
                        </div>

                        <script type="text/html" id="barDemo">
                            <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="top"
                               topUrl="views/datagrid/edit.html" topMode="readonly" topWidth="800px" topHeight="600px"
                               topTitle="查看信息" inputs="processInstanceId:,processDefinitionId"><i class="layui-icon">&#xe615;</i>查看信息</a>
                            <a class="layui-btn layui-btn-xs" lay-event="top" topUrl="views/sys/user/edit.html"
                               topWidth="800px" topHeight="600px" topTitle="编辑用户" inputs="userId:"><i class="layui-icon">&#xe62a;</i>审批记录</a>
                            <a class="layui-btn layui-btn-xs" lay-event="apprProc"><i class="layui-icon">&#xe623;</i>审批进度</a>
                        </script>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
    layui.fsButton.apprProc = function (elem, data, datagrid) {
        var url = baseURL + "act/view/picture.jpg?procInstId="+data.processInstanceId;
        var img = "<img src='" + url + "' />";

        layer.open({
            type: 1,
            title: false,
            closeBtn: 0,
            area: ['1000px', '600px'],
            skin: 'layui-layer-nobg', //没有背景色
            shadeClose: true,
            content: img
        });
    }
</script>
</body>
</html>
